<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 进度条css引入 -->
    <link rel="stylesheet" href="../assets/lib/NProgress/NProgress.css">
</head>
<body>
    <button>提交</button>
    <!-- 进度条js引入 -->
    <script src="../assets/lib/NProgress/NProgress.js"></script>
    <script>
        document.querySelector('button').addEventListener('click',function(e){
            // 进度条开始
            NProgress.start()
        setTimeout(() => {
            // 进度条结束
            NProgress.done()
        }, 5000);

        })
       
    </script>
</body>
</html>